package org.exeed.service;

import cn.hutool.core.date.DateUtil;
import cn.hutool.core.io.FileUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.exeed.dao.ImageMapper;
import org.exeed.dao.SysMapper;
import org.exeed.dao.VideoMapper;
import org.exeed.entity.ImageEntity;
import org.exeed.entity.SysEntity;
import org.exeed.entity.VideoEntity;
import org.exeed.utils.JWTUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

@Service
public class SysService {


    @Autowired
    private SysMapper sysMapper;

    public String getDefaultUrl() {
        return sysMapper.selectOne(new QueryWrapper()).getResourceUrl();
    }

    public void update(SysEntity sysEntity) {
        sysMapper.updateById(sysEntity);
    }

    public SysEntity selectOne() {
        return sysMapper.selectOne(new QueryWrapper());
    }
}
